package com.neusoft.elm.dao;
import com.neusoft.elm.po.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserDao {
    @Insert("insert into user values(#{userId},#{password},#{userName},#{userSex},#{userImg},1)")
     int saveUser(User user) throws Exception;
    @Select("select * from user where userId=#{userId} and password=#{password}")
    User getUserByIdByPass(@Param("userId")String userId, @Param("password")String password) throws Exception;
    @Select("select * fom user where userId=#{userId}")
    User getUserById(String userId) throws Exception;
}
